package test;

import com.hrpmar.controller.dto.MessageSenderDto;
import com.hrpmar.mapper.MessageSenderMapper;
import com.hrpmar.pojo.MessageSender;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by c on 2017-12-04.
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:applicationContext.xml")
public class MessageSenderText {

    @Resource
    private MessageSenderMapper messageSenderMapper;

    @Test
    public void textSearch(){
        MessageSenderDto dto = new MessageSenderDto();
        dto.setRecWorker("GH10001");
        dto.setSendWorker("GH10001");

        List<MessageSender> list = messageSenderMapper.search(0,4,dto);
        for(MessageSender mes:list){
            System.out.println("发送："+mes.getWorker().getWoName()+"======>接受："+mes.getMessageReceiver().getWorker().getWoName());
        }
    }



}
